﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using ClipperHouse.jQuery.Base;

namespace ClipperHouse.jQuery
{
	public class Stop : JQuery
	{
		public override string jQueryMethodName
		{
			get { return "stop"; }
		}

		protected override void OnLoad(EventArgs e)
		{
			this.Params.Clear();

			// if either param is specified, both must be added as params for clarity
			bool specifyParams = (isSetClearQueue || isSetGoToEnd);

			if (specifyParams)
			{
				this.Params["ClearQueue"] = this.ClearQueue.ToString();
				this.Params["GoToEnd"] = this.GoToEnd.ToString();
			}
			base.OnLoad(e);
		}

		public bool ClearQueue
		{
			get
			{
				return _ClearQueue;
			}
			set
			{
				_ClearQueue = value;
				isSetClearQueue = true;
			}
		}
		private bool _ClearQueue = false;
		private bool isSetClearQueue = false;

		public bool GoToEnd
		{
			get
			{
				return _GoToEnd;
			}
			set
			{
				_GoToEnd = value;
				isSetGoToEnd = true;
			}
		}
		private bool _GoToEnd = false;
		private bool isSetGoToEnd = false;
	}
}
